home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / catD / bzero.z / bzero
Encoding:
Text File  |  2002-10-03  |  4.4 KB  |  131 lines

  1.  
  2.  
  3.  
  4. bbbbzzzzeeeerrrroooo((((DDDD3333))))                                                            bbbbzzzzeeeerrrroooo((((DDDD3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _bbbb_zzzz_eeee_rrrr_oooo - clear memory for a given number of bytes
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_>>>>
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_dddd_dddd_iiii_...._hhhh_>>>>
  14.      _vvvv_oooo_iiii_dddd _bbbb_zzzz_eeee_rrrr_oooo_((((_cccc_aaaa_dddd_dddd_rrrr______tttt _a_d_d_r_,,,, _ssss_iiii_zzzz_eeee______tttt _b_y_t_e_s_))))_;;;;
  15.  
  16.    AAAArrrrgggguuuummmmeeeennnnttttssss
  17.      _a_d_d_r      Starting virtual address of memory to be cleared.
  18.  
  19.      _b_y_t_e_s     The number of bytes to clear.
  20.  
  21. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  22.      The _bbbb_zzzz_eeee_rrrr_oooo function clears a contiguous portion of memory by filling the
  23.      memory with zeros.  It chooses the best algorithm based on address
  24.      alignment and number of bytes to clear.
  25.  
  26.    RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeeessss
  27.      None
  28.  
  29. UUUUSSSSAAAAGGGGEEEE
  30.      There are no alignment restrictions on _a_d_d_r, and no length restrictions
  31.      on _b_y_t_e_s, other than the address range specified must be within the
  32.      kernel address space and must be memory resident.  No range checking is
  33.      done.  Since there is no mechanism by which drivers that conform to the
  34.      rules of the DDI/DKI can obtain and use a kernel address that is not
  35.      memory resident (an address that is paged out), DDI/DKI conforming
  36.      drivers can assume that any address to which they have access is memory
  37.      resident and therefore a valid argument to _bbbb_zzzz_eeee_rrrr_oooo.  An address within user
  38.      address space is not a valid argument, and specifying such an address may
  39.      cause the driver to corrupt the system in an unpredictable way.
  40.  
  41.    LLLLeeeevvvveeeellll
  42.      Initialization, Base or Interrupt.
  43.  
  44.    SSSSyyyynnnncccchhhhrrrroooonnnniiiizzzzaaaattttiiiioooonnnn CCCCoooonnnnssssttttrrrraaaaiiiinnnnttttssss
  45.      Does not sleep.
  46.  
  47.      Driver-defined basic locks, read/write locks, and sleep locks may be held
  48.      across calls to this function.
  49.  
  50.    EEEExxxxaaaammmmpppplllleeeessss
  51.      In a driver _cccc_llll_oooo_ssss_eeee(D2) routine, rather than clear each individual member
  52.      of its private data structure, the driver could use _bbbb_zzzz_eeee_rrrr_oooo as shown here:
  53.         _bbbb_zzzz_eeee_rrrr_oooo_((((_((((_cccc_aaaa_dddd_dddd_rrrr______tttt_))))_&&&&_dddd_rrrr_vvvv______dddd_aaaa_tttt_[[[[_gggg_eeee_tttt_mmmm_iiii_nnnn_oooo_rrrr_((((_dddd_eeee_vvvv_))))_]]]]_,,,, _ssss_iiii_zzzz_eeee_oooo_ffff_((((_ssss_tttt_rrrr_uuuu_cccc_tttt _dddd_rrrr_vvvv_rrrr______dddd_aaaa_tttt_aaaa_))))_))))_;;;;
  54.  
  55.  
  56.  
  57.  
  58.  
  59.                                                                         PPPPaaaaggggeeee 1111
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66. bbbbzzzzeeeerrrroooo((((DDDD3333))))                                                            bbbbzzzzeeeerrrroooo((((DDDD3333))))
  67.  
  68.  
  69.  
  70. REFERENCES
  71.      _bbbb_cccc_oooo_pppp_yyyy(D3), _cccc_llll_rrrr_bbbb_uuuu_ffff(D3), _kkkk_mmmm_eeee_mmmm______zzzz_aaaa_llll_llll_oooo_cccc(D3)
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.                                                                         PPPPaaaaggggeeee 2222
  126.  
  127.  
  128.  
  129.